# Contributor: Jonas <3426-spameier@users.gitlab.alpinelinux.org>
# Maintainer: Jonas <3426-spameier@users.gitlab.alpinelinux.org>
pkgname=py3-unidns
_pyname="unidns"
pkgver=0.0.1
pkgrel=2
pkgdesc="Rudimentary async DNS client in Python"
url="https://github.com/skelsec/unidns"
arch="noarch"
license="MIT"
depends="
	py3-asysocks
	python3
	"
makedepends="
	py3-gpep517
	py3-wheel
	py3-setuptools
	"
subpackages="$pkgname-pyc $pkgname-examples"
source="$pkgname-$pkgver.tar.gz::https://github.com/skelsec/unidns/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
options="!check" # no tests provided

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

examples() {
	pkgdesc="$pkgdesc (example client)"
	depends="$pkgname=$pkgver-r$pkgrel"
	amove usr/lib/python*/site-packages/unidns/examples
	amove usr/bin
}

sha512sums="
5251f740dcb34d78cd8dea2cfd87e1c5ffa5776745ca2d8e080f8a002c3441a96806ec1b244b81cc0e38d5b152a36614da9a3161eeeebf01c28c2c99de046d4c  py3-unidns-0.0.1.tar.gz
"
